package interaction

import (
	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
	"gorm.io/gorm"
)

// UserRelation 用户关系
type UserRelation struct {
	gorm.Model
	FanID  uint           `gorm:"primaryKey;not null;index;" `
	IdolID uint           `gorm:"primaryKey;not null;index;"`
	Fan    system.SysUser `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:FanID;"`
	Idol   system.SysUser `gorm:"constraint:OnUpdate:CASCADE,OnDelete:SET NULL;foreignKey:IdolID;"`
	Status int
}

const (
	UnFollowCode = iota + 1
	FollowCode
	BlockFollow
)

const (
	Fan = iota + 1
	Idol
)
